import java.io.OutputStream;

/**
 * Interface for recording symbol information for a given URBAN program.
 * 
 * The symbol table is used to track the label of the symbol, its address,
 * usage, and a string for equated symbols.
 * 
 * @author Michael Griscom
 * @version %I%, %G%
 * @since 4/5/2012
 */
public interface ISymbolTable {

	/**
	 * print outputs the SymbolTable to the given OutputStream.
	 * 
	 * @param os
	 *            is the OutputStream to print the SymbolTable to
	 */
	void print(OutputStream os);

	/**
	 * add defines a new entry in the symbol table according to the given
	 * parameters. It returns true if the label was not already present in the
	 * table.
	 * 
	 * @param label
	 *            is the string applied to the symbol within the program
	 * @param address
	 *            is the location of the symbol
	 * @param usage
	 *            is a string describing the type of the symbol
	 * @param str
	 *            is a string used when the symbol is equated, in which case it
	 *            represents the equated value
	 * @return true iff label was not already in the SymbolTable
	 */
	boolean add(String label, int address, String usage, String str);
}
